/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/test', controller.home.test);

  router.post('/api/v1/mod/run_cql', controller.v1.mod.run_cql);
  router.post('/api/v1/mod/add', controller.v1.mod.create);
  router.post('/api/v1/mod/upd', controller.v1.mod.update);
  router.post('/api/v1/mod/all', controller.v1.mod.findAll);
  router.post('/api/v1/mod/one', controller.v1.mod.findOne);
  router.post('/api/v1/mod/del', controller.v1.mod.destroy);
  router.post('/api/v1/mod/add_col', controller.v1.mod.add_col);
  router.post('/api/v1/mod/del_col', controller.v1.mod.del_col);
  router.post('/api/v1/mod/node_prop', controller.v1.mod.node_prop);
  router.post('/api/v1/mod/node', controller.v1.mod.node);
  router.post('/api/v1/mod/relate', controller.v1.mod.relate);
  router.post('/api/v1/mod/add_relate', controller.v1.mod.add_relate);
  router.post('/api/v1/mod/del_relate', controller.v1.mod.del_relate);
};
